﻿using Pattern07适配器模式.Interface;
using Pattern07适配器模式.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern07适配器模式
{
    internal class Client
    {
        public void Start()
        {
            IVehicle car = new Car();
            car.Run();
            car.Whistle();

            IVehicle train=new Train();
            train.Run();
            train.Whistle();

            //Bicycle bicycle = new Bicycle();
            //bicycle.Cycling();
            //bicycle.RingBell();

            IVehicle bicycle = new BicycleInheritAdapter();
            bicycle.Run();
            bicycle.Whistle();


            IVehicle bike = new BicycleCombinationAdapter(new Bicycle());
            //((BicycleCombinationAdapter)bike).Bicycle = new Bicycle();
            //((BicycleCombinationAdapter)bike).SetBicycle(new Bicycle());

            bike.Run();
            bike.Whistle();

        }
    }
}
